from flask import Flask
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.executors.pool import ProcessPoolExecutor

executors = {
    'default':ProcessPoolExecutor(3)
}

app = Flask(__name__)
app.scheduler = BackgroundScheduler(executors=executors)
def print_tset():
    print(111)
app.scheduler.add_job(print_tset, 'interval', seconds=3)


@app.route('/')
def index():
    return 'index'

if __name__ == '__main__':
    app.scheduler.start()
    app.run(debug=True)

